package com.qf.mybatisplus.controller;

import com.qf.mybatisplus.function.factory.FruitService;
import com.qf.mybatisplus.resultBean.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description: TODO
 * @projectName: mybatisplus
 * @package: com.qf.mybatisplus.controller
 * @className: FruitFactoryController
 * @author: zdd
 * @date: 2023/11/29 上午10:26
 * @version: 1.0
 */
@RestController
@RequestMapping("/fruit")
public class FruitFactoryController {

    @Autowired
    private FruitService fruitService;

    @RequestMapping("/getFruitName")
    public Result getFruitName(String fruit){
        String fruitName = fruitService.getFruitName(fruit);
        return Result.success("成功",fruitName);
    }
}
